#pragma once

#include<iostream>
#include<string>

using namespace std;

static const string temp_path = "./temp/";
namespace ns_util
{
	class PathUtil
	{
	public:
		static string AddSuffix(const string& file_name, const string& suffix)
		{
			string path_name = temp_path;
			path_name += file_name;
			path_name += suffix;
			return path_name;
		}
		const string Exe(const string& file_name)
		{
			return AddSuffix(file_name, ".exe");
		}

		const string CompileError(const string& file_name)
		{
			return AddSuffix(file_name, ".compile_error");
		}

		const string Src(const string& file_name)
		{
			return AddSuffix(file_name, ".cpp");
		}
	};

	class FileUtil
	{
	public:
		static bool IsFireExists(const string& path_name)
		{
			struct stat st;
			if (stat(path_name.c_str(), &st) == 0)
			{
				return true;
			}
			return false;
		}
	};
}